package com.ch.boundarycallbackdemo.db

import androidx.room.Database
import androidx.room.Room
import androidx.room.RoomDatabase
import com.ch.boundarycallbackdemo.MyApp
import com.ch.boundarycallbackdemo.bean.Data

@Database(entities = [Data::class], version = 1, exportSchema = false)
abstract class NewsDataBase : RoomDatabase() {
    abstract fun getNewsDao(): NewsDao

    companion object {
        val INSTALL = Room.databaseBuilder(
            MyApp.INSTALL,
            NewsDataBase::class.java,
            "news_db.db"
        ).build()
    }
}